let defaultData = {//定义reudx默认数据
    list:[],
    data:[]
}

const reduce = (state = defaultData ,actions) =>{
    let newState = JSON.parse(JSON.stringify(state))//深拷贝
    switch (actions.type) {
        case "ALLlIST":
            newState.list = actions.payload
            return newState
        
        default:
            return newState
    }
}

export default reduce